package gam.n1;

import gam.n1.areas.AreaManager;
import gam.n1.areas.impl.a.DefaultDefendVArea;
import gam.n1.cm.Acm;
import gam.n1.conf.ConfManager;
import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;

public final class Area extends JavaPlugin {
    private AreaManager am;
    private ConfManager cm;
    @Override
    public void onEnable() {
        this.cm = new ConfManager(this);
        this.am = new AreaManager(this);
        saveDefaultConfig();
        getCommand("area").setExecutor(new Acm(this));
        AreaManager.register("ddv", DefaultDefendVArea.class);
        cm.load(this);
        am.__RUN__();
    }


    public AreaManager getAreaManager() {
        return am;
    }

    @Override
    public void onDisable() {
        am.__DIE__();
    }
}
